package com.gsbelarus.gedemin.lib.ui.viewpager;

import android.content.Context;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.view.MotionEvent;

public class VP extends ViewPager {

    private boolean isSliding = true;

    public VP(Context context) {
        super(context);
    }

    public VP(Context context, AttributeSet attributeSet) {
        super(context, attributeSet);
    }

    @Override
    public boolean onInterceptTouchEvent(MotionEvent e) {
        if (isSliding)
            return super.onInterceptTouchEvent(e);
        return false;
    }

    public void setSliding(boolean isSliding) {
        this.isSliding = isSliding;
    }
}
